package com.sc.web.gwt.client.event;

import com.google.gwt.event.shared.GwtEvent;

/**
 * User: KienCT
 * Date: 14/07/2011
 * Time: 00:01
 */
public class LoginEvent extends GwtEvent<LoginEventHandler> {
    public static Type<LoginEventHandler> TYPE = new Type<LoginEventHandler>();
    private Object account;

    public LoginEvent(Object account) {
        this.account = account;
    }

    public Type<LoginEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(LoginEventHandler handler) {
        handler.onLogin(account, this);
    }
}
